<?php if(!defined('PHPOK_SET')){die('<h3>Error...</h3>');}?><?php QG_C_TEMPLATE::p("inc.head","","0");?>
<?php QG_C_TEMPLATE::p("inc.bigad","","0");?>
<div id="bd">
    <div id="toolbar" class="clearfix">
    	<div id="md_sitemap">
    	    <a href="home.php">Home</a>>
    	    <?php $_i=0;$lead_menu=(is_array($lead_menu))?$lead_menu:array();foreach($lead_menu AS  $key=>$value){$_i++; ?>
    	    <a href="<?php echo $value[url];?>"><?php echo $value[name];?></a>>
    	    <?php } ?>
    	</div>
    	<?php QG_C_TEMPLATE::p("inc.search","","0");?>
    </div>
    
    <div id="newslistwrap">
        <div id="md_topnews" class="clearfix">
            <?php 
            $topnews = $msglist[0];
            $rsc = $DB->qgGetOne("SELECT * FROM ".$prefix."msg_content WHERE id='".$topnews[id]."'");
            $rsi = $DB->qgGetOne("SELECT * FROM ".$prefix."upfiles WHERE id='".$topnews[thumb]."'");
            $content = $topnews["ext_docket"]==""?$rsc["content"]:$topnews["ext_docket"];
            ?>
            <div class="pic">
                <a href="msg.php?id=<?php echo $topnews[id];?>">
                    <img src="<?php if(isset($rsi[folder])){echo $rsi[folder].$rsi[filename];}else{echo 'templates/en/default/images/nopicture_320_240.gif';}?>" />
                </a>
            </div>
            <div class="info">
                <h3><a href="msg.php?id=<?php echo $topnews[id];?>"><?php echo $topnews[subject];?></a></h3>
                <div class="ct"><?php echo $content;?></div>
            </div>
        </div>
        
        <div id="md_newslist">
            <ul class="clearfix">
            <?php $_i=0;$msglist=(is_array($msglist))?$msglist:array();foreach($msglist AS  $key=>$value){$_i++; ?>
                <li><a href="msg.php?id=<?php echo $value[id];?>" title="<?php echo $value[subject];?>" ><?php echo $value[cut_subject];?></a></li>
            <?php } ?>
            </ul>
            <div class="pager"><?php echo $pagelist;?></div>
        </div>
    </div>
    
</div>

<?php QG_C_TEMPLATE::p("inc.foot","","0");?>